package generics;

/**
 * @author 杨宇
 * @version 1.0 2016/11/3
 */
public class E26_CovariantArrays2 {
    public static void main(String[] args) {
        Number[] nums = new Integer[10];
        nums[0] = Integer.valueOf(1);

        try {
            nums[0] = new Float(1.0f);
        } catch (Exception e) {
            System.out.println(e);
        }

        try {
            nums[0] = Byte.valueOf((byte) 1);
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}
